package configs

import "time"

type Config struct {
	MySQL struct {
		ReadWrite struct {
			Addr string `yaml:"addr"`
			User string `yaml:"user"`
			Pass string `yaml:"pass"`
			Name string `yaml:"name"`
		} `yaml:"readWrite"`
		Read struct {
			Addr string `yaml:"addr"`
			User string `yaml:"user"`
			Pass string `yaml:"pass"`
			Name string `yaml:"name"`
		} `yaml:"read"`
		Write struct {
			Addr string `yaml:"addr"`
			User string `yaml:"user"`
			Pass string `yaml:"pass"`
			Name string `yaml:"name"`
		} `yaml:"write"`
		Base struct {
			MaxOpenConn     int           `yaml:"maxOpenConn"`
			MaxIdleConn     int           `yaml:"maxIdleConn"`
			ConnMaxLifeTime time.Duration `yaml:"connMaxLifeTime"`
		} `yaml:"base"`
	} `yaml:"mysql"`

	Redis struct {
		Addr         string `yaml:"addr"`
		Pass         string `yaml:"pass"`
		Db           int    `yaml:"db"`
		MaxRetries   int    `yaml:"maxRetries"`
		PoolSize     int    `yaml:"poolSize"`
		MinIdleConns int    `yaml:"minIdleConns"`
	} `yaml:"redis"`

	Kafka struct {
		BrokerList []string `yaml:"brokerList"`
	} `yaml:"kafka"`
}
